<script setup lang="ts">
import { ref } from "vue";
defineOptions({ name: "viewIndex" });

const keepAliveComponentsName = ref<string[]>([]);
</script>

<template>
    <router-view v-slot="{ Component, route }">
        <keep-alive v-if="keepAliveComponentsName" :include="keepAliveComponentsName">
            <component :is="Component" :key="route.fullPath" />
        </keep-alive>
        <component v-else :is="Component" :key="route.fullPath" />
    </router-view>
</template>

<style scoped></style>
